<nz-spin *ngIf="isLoading" class="modal-spin"></nz-spin>
<h2><i class="anticon anticon-exception"></i> 基础信息</h2>
<div *ngIf="!isLoading">
  <desc-list [col]="2">
    <desc-list-item term="发布用户">{{ entity.cusName }} </desc-list-item>
    <desc-list-item term="发布时间">{{ entity.saveDate }} </desc-list-item>
    <desc-list-item term="是否删除">{{entity.status|yesNoPipe}}</desc-list-item>
    <desc-list-item term="是否屏蔽">{{entity.beScreen|yesNoPipe}}</desc-list-item>
  </desc-list>
  <p style="margin-top: 16px;" *ngIf="entity.content">动态内容：{{entity.content}}</p>
  <p *ngIf="!entity.videoKey" style="margin-top: 16px;">动态图信息：<br/>
    <ng-container *ngFor="let img of imgs">
      <img [src]="img|qCloudDomain" (click)="showPic(img)" title="点击查看大图"
           style="max-height: 120px;max-width: 120px;margin:5px;cursor: pointer;" alt="加载出错"/>
    </ng-container>
  </p>
  <p *ngIf="entity.videoKey" style="margin-top: 16px;">动态视频信息：<br/>
    <video width="320" height="240" controls>
      <source [src]="entity.videoKey"  type="video/mp4">
      您的浏览器不支持 HTML5 video 标签。
    </video>
  </p>
  <ng-container *ngIf="entity.status == 2">
    <h2><i class="anticon anticon-exception"></i> 点赞情况</h2>
    <nz-table #basicTable [nzData]="entity.otcMomentsPraiseInfoList" [nzShowPagination]="false">
      <thead>
      <tr>
        <th>点赞人</th>
        <th>点赞时间</th>
      </tr>
      </thead>
      <tbody>
      <ng-container *ngFor="let data of basicTable.data">
          <tr>
            <td>{{data.cusName}}</td>
            <td>{{data.saveDate}}</td>
          </tr>
      </ng-container>
      </tbody>
    </nz-table>
  </ng-container>
  <ng-container *ngIf="entity.status == 2">
    <h2><i class="anticon anticon-exception"></i> 评论情况</h2>
    <nz-table #basicTable [nzData]="entity.otcMomentsReplyInfoList" [nzShowPagination]="false">
      <thead>
      <tr>
        <th>评论人</th>
        <th>接收人</th>
        <th>内容</th>
        <th>时间</th>
      </tr>
      </thead>
      <tbody>
      <ng-container *ngFor="let data of basicTable.data">
          <tr>
            <td>{{data.fromCusName}}</td>
            <td>{{data.toCusName}}</td>
            <td [title]="data.content">{{data.content|stringEllipsisCutPipe:20}}</td>
            <td>{{data.saveDate}}</td>
          </tr>
      </ng-container>
      </tbody>
    </nz-table>
  </ng-container>
</div>
<div class="modal-footer">
  <button nz-button type="button" (click)="close()">关闭</button>
</div>
<pic-viewer [picList]="picList" [picIdx]="0" [show]="isShowPic" (onClose)="onPicClose($event)"></pic-viewer>
